<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Orinoco Web - Compositor</title>
<link href="Estilo/estilo.css" rel="stylesheet" type="text/css" />
<script src="javascript/prototype.js" type="text/javascript" language="javascript"></script>
<script src="javascript/spinbox.js" language="javascript"></script>   
<script type="text/javascript" >
function writeform(identifier){
if(identifier == "inputs") {
selobj1=document.getElementById('selform1');
newobj1=document.getElementById('newform1');
p=document.getElementById('inputs').value;

txt = "";
var num;
for(i = 0; i < p; i++) { 
  txt += 'URL: <input type="text" name="inurl_'+i+'" /> Number of values: <input value="0" type="text" id="inputs'+i+'" onchange="writeform2('+i+');"/><br/>'
  txt += '<div id="inputtext'+i+'"></div><br/>';
 
}
newobj1.innerHTML=txt;
if(p != 0) {
	selobj1.style.display='block';
} else {
	selobj1.style.display='none';	
};
} else {
selobj2=document.getElementById('selform2');
newobj2=document.getElementById('newform2');
q=document.getElementById('outputs').value;
txt = "";
for(i = 0; i < q; i++) { 
  txt += 'URL: <input type="text" name="output'+i+'"/><br/>';
}
newobj2.innerHTML=txt;
if(q != 0) {
	selobj2.style.display='block';
} else {
	selobj2.style.display='none';	
};
}
}; 

function writeform2(arg_1) {
	in1=document.getElementById('inputtext'+arg_1);
	p=document.getElementById('inputs'+arg_1).value;

	txt = "";
	for(i = 0; i < p; i++) { 
  		txt += 'Value: '+'<input type="text" name="inputs'+arg_1+'-'+i+'"/><br/>';
	}
	in1.innerHTML=txt;
};
</script> 
</head>

<body onload="new SpinBox('inputs',0,99999999999,0); new SpinBox('outputs',0,99999999999,0);">
<div id="menu">
<ul>
<li><a href="home.php"><img src="Imagenes/logo/icon_home.png"/></a></li>
<li><a href="publicator.php">Publisher</a></li>
<li><a href="registry.php">Registry</a></li>
<li><a href="compositor.php">Composer</a></li>
<li><a href="evaluator.php">Evaluator</a></li>
<li><a href="docs.php">Documentation</a></li>
<li><a href="#">Administration</a></li>
</ul>
</div>
<div id="login_bar">
	Logged in as <a href="#">cesrafa</a> |
	<a href="#">LOGOUT</a>
</div>
	
<div id="content">
<p id="index_title">Orinoco Web - Composer</p>
<form action="callComposer.php" method="post">
 Select a file: <input type="file" name="archivo" id="archivo" accept="application/xml"/><input type="submit" value="Submit"/> 
</form>
    <br /> 
    or
 fill the next form:
<form action="compositorcreator.php" method="post">
 Query name: <input type="text" name="query" id="query"/><br />
 Number of inputs: <input value="0" type="text" name="inputs" id="inputs" onchange="writeform(this.id);"/><br />
 <div id="selform1" style="display:none">
  <fieldset><div id="newform1"></div></fieldset>
  </div><br />
  Number of outputs: <input value="0" type="text" id="outputs" name="outputs" onchange="writeform(this.id);"/><br />
 <div id="selform2" style="display:none">
  <fieldset><div id="newform2"></div></fieldset>
  </div><br />
    <input type="submit" value="Submit"/> 
</form>
</div>

<div id="footer">
    <div id="footer_universities">
    <img src="Imagenes/logo/usb.jpg"/>
    <img src="./Imagenes/logo/nanterre.png"/>
    <img src="Imagenes/logo/dauphine.jpg"/>
    		<ul>
	<li><a href="home.php"><img src="Imagenes/logo/icon_home_footer.png"/></a></li>
	<li><a href="publicator.php">Publicator</a></li>
	<li><a href="registry.php">Registry</a></li>
	<li><a href="compositor.php">Compositor</a></li>
	<li><a href="evaluator.php">Evaluator</a></li>
	<li><a href="#">Administration</a></li>
	</ul>
    </div>
    
</div>
</body>
</html>
